<?php
class demo{
	public $param1 = 1;
	public $param2 = 2;
}
$a = new demo();
$b = (array)$a;
var_dump($b);